Skip to content

Fix Boost.Bind global placeholder deprecation warning - #21

Merged
egull merged 1 commit into
masterfrom
fix-boost-bind-deprecation
Jun 3, 2026
Merged

Fix Boost.Bind global placeholder deprecation warning#21
egull merged 1 commit into
masterfrom
fix-boost-bind-deprecation

Conversation

@egull

@egull egull commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace #include <boost/bind.hpp> with #include <boost/bind/bind.hpp> in hybmain.cpp
  • boost/bind.hpp injects _1, _2, … into the global namespace, which Boost 1.73+ warns about at compile time
  • No using namespace boost::placeholders needed since the only call site (s.run(boost::bind(&stop_callback, ...))) uses a plain function pointer with no placeholders

Test plan

  • Build with Boost ≥ 1.73 and confirm the #pragma message deprecation note no longer appears
  • Verify alps_cthyb links and runs as before

🤖 Generated with Claude Code

<boost/bind.hpp> injects _1, _2, ... into the global namespace, which
Boost 1.73+ deprecates with a #pragma message. Switch to the
non-polluting header <boost/bind/bind.hpp>; no using-declaration needed
since the call site uses a plain function pointer with no placeholders.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Boost.Bind include in hybmain.cpp to avoid the Boost 1.73+ deprecation warning caused by boost/bind.hpp injecting _1, _2, … into the global namespace, while keeping existing boost::bind usage intact.

Changes:

  • Replace #include <boost/bind.hpp> with #include <boost/bind/bind.hpp> in hybmain.cpp.
  • Preserve the existing boost::bind(&stop_callback, ...) call site without introducing boost::placeholders (none are used).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@egull
egull merged commit 9b6a2e4 into master Jun 3, 2026
1 check passed
@egull
egull deleted the fix-boost-bind-deprecation branch June 3, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants